package router

import (
	"fx_swift_ifcgate/internal/controller"
	"fx_swift_ifcgate/pkg/upload"
	"github.com/gin-gonic/gin"
)

var miniApiVer *gin.RouterGroup

func InitRouter(g *gin.Engine) {
	installController(g)
}

func installController(engine *gin.Engine) {
	miniApiVer = engine.Group("api/ifcgate")

	miniApiVer.POST("register", controller.Register)
	miniApiVer.POST("login", controller.Login)
	miniApiVer.POST("forgetPassword", controller.ForgetPassword)

	miniApiVer.GET("sendMailCode", controller.SendMailCode)
	miniApiVer.GET("emailIsExit", controller.EmailIsExit)
	miniApiVer.GET("getCountryInfo", controller.GetCountryInfo)
	miniApiVer.GET("getCurrencyInfo", controller.GetCurrencyInfo)
	miniApiVer.GET("getPayeeType", controller.GetPayeeType)
	miniApiVer.GET("getTradePurpose", controller.GetTradePurpose)
	miniApiVer.GET("getPurposeList", controller.GetPurposeList)
	miniApiVer.GET("checkInvitationCode", controller.CheckInvitationCode)

	miniApiVer.POST("postTp6001", controller.PostTp6001)
	miniApiVer.POST("postTp6002", controller.PostTp6002)
	miniApiVer.POST("postTp6003", controller.PostTp6003)
	miniApiVer.POST("postTp6004", controller.PostTp6004)

	miniApiVer.POST("uploaderToS3", upload.UploadToS3)
	miniApiVer.POST("uploader", upload.BatchUpload)

	miniApiVer.POST("upLoadFiles", controller.UpLoadFiles)
	miniApiVer.POST("getTestName", controller.GetTestName)

	UserRouter()
	MerChantVARouter()
	PayeeRouter()
	ExchangeCurrencyRouter()
	IndexRouter()
	VAINfoRouter()
	TransferRouter()
}
